#include <iostream>
#include <string>

template <class T>
class Array{
private:
    T * ptr;
    int size;
public:
    Array(){}
    Array(T arr[],int s);
    void print();
    virtual void show();
};

template <class T>
void Array<T>::print()
{
    for(int i =0;i < size;++i){
        std::cout << " " << *(ptr * i);
    }
    std::cout << std::endl;
}

template <class T>
void Array<T>::show()
{
    std::cout << size << std::endl;
}

int main()
{
    std::string str = "hello";
    Array<int> a{};
    a.print(); // 只有使用时，才会检查错误


}